/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 *  This file is part of Spidex.
 *  
 *  Spidex is free software: you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation, either version 3 of the License, or
 *  (at your option) any later version.
 *  
 *  Spidex is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *  
 *  You should have received a copy of the GNU General Public License
 *  along with Spidex.  If not, see <http://www.gnu.org/licenses/>.
 */

package WindowLogger;

import java.util.logging.Level;
import java.util.logging.Logger;

/**
 *
 * @author xatrix
 */
public class WindowLogger {
    
    private static Logger logger;
    private WindowLoggerHandler handler = WindowLoggerHandler.getInstance();
    private static WindowLoggerDialog dialog;
    
    public WindowLogger() {
        dialog = handler.getWindowDialog();
        handler.setFilter(new WindowFilter(Level.FINE));
        logger = Logger.getLogger("WindowLogger");
        logger.addHandler(handler);
    }

    public static WindowLoggerDialog getDialog() {
        return dialog;
    }

    public Logger getLogger() {
        return logger;
    }

    public void setVisible(boolean value) {
        dialog.setVisible(value);
    }
    

}
